<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ include file="/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>
<%@ include file="/uilibs.jsp" %>
<link href="${js}/uploadify/uploadify.css" rel="stylesheet"type="text/css" />
<script src="${js}/uploadify/jquery.uploadify.js" type="text/javascript"></script>
<script>
$(function(){
	$('#uploadify').uploadify({
		cancelImg: '${js}/uploadify/uploadify-cancel.png',
		buttonImage:'${img}/browse-btn.png',
		swf      : '${js}/uploadify/uploadify.swf',
		uploader : '${ctx}/system/common/upload?folder=doc',
		auto     : true,
		fileSizeLimit : 1024000,//上传文件不超过1000M
		buttonText : '选择文件',
		onQueueComplete : function(queueData){ //队列完成后触发
			//alert(queueData.uploadsSuccessful);
		},
		onUploadComplete : function(file,data) { //每个文件上传成功后触发
			//alert(file.name + data);
		},
		onUploadSuccess : function(file,data) { //每个文件上传成功后触发
			console.log(data);
		},
		onUploadError : function(file, errorCode, errorMsg, errorString) {
        	//alert('文件: ' + file.name + ' 上传失败，原因: ' + errorString);
        	mini.alert("服务器异常，请稍后重试!");
    	},
        onCancel : function(file) {
            mini.alert('文件： ' + file.name + ' 取消上传');
        }
	});
});
</script>
</head>
<body>

	<input type="file" name="uploadify" id="uploadify" multiple="true"/>
</body>
</html>